package com.syezon.wifikey.config;

import com.blankj.utilcode.util.SPUtils;

public class HomeConfig {

    public static final int OPT_OVER_AD_SOURCE_TT = 1;
    public static final int OPT_OVER_AD_SOURCE_NONE = 0;

    private static final String CONFIG_NAME = "home_config";
    private static final String OPT_OVER_AD_SOURCE = "opt_over_ad_source";

    /**
     * @return 获取优化完成广告来源
     */
    public static int getOptOverAdSource() {
        return SPUtils.getInstance(CONFIG_NAME).getInt(OPT_OVER_AD_SOURCE, OPT_OVER_AD_SOURCE_NONE);
    }

    /**
     * @param adSource 保存优化完成广告来源
     */
    public static void saveOptOverAdSource(int adSource) {
        SPUtils.getInstance(CONFIG_NAME).put(OPT_OVER_AD_SOURCE, adSource);
    }
}
